divert(-1)

   The pair:  -1 ... 0 diverts the intervening text into the bit bucket.

 -------------------------------------------------------------- GENERIC	 --

   These definitions are worthy of promotion to a more general library.

   DEFAULT( default arg, overridden by non empty 2nd arg)

define("{_default}","{ifelse($2,,$1,$2)}")

 ---------------------------------------------------------------- LOCAL	 --

   File In Package 

       fipf( package, file)   

   adds "file" to list of files in "package"

   returns list of files

define("{_fipf}","{esyscmd(source mk2lib 2>/dev/null; fipf $1)}")

    A builtin metacharacter table

       {empty}   095, the undersore
       LP        040, the left Paren
       RP        041, the right paren
       COMMA     044, the comma

       {default} ..., it had better evaluate to a mch, e.g. "nbsp"


define("{_mcx}","{ifelse($1,,095,$1,LP,040,$1,RP,041,$1,COMMA,044,$1,UNDERSCORE,095,$1)}")

define("{_plussify}","{translit($1,"{ }",+)}")

define("{_searchStr}","{_plussify(_default($1,$2))}")

define("{_tocHead}","{ifelse(eval($1<3),1,"{_(li,,_(a,_(href,#$3),$3))}")}")

 ----------------------------------------------------------------- USER	 --

define("{concat_}","{$1$2$3$4$5$6$7$8$9}")

define("{_h}","{_(a,_(name,$3),
		_(a,_(href,#DocumentTop),_(h$1,shift($@))))}")


define("{_mch}","{&#_mcx($1);}")

define("{_mcl}","{&$1;}")

define("{_showTextFile}","{_(a,_(href,_fipf($2))$1,$3)}")

define("{_a_href}","{_(a,_(href,http://$2)$1,_default($2,$3))}")

define("{_reference}","{_(a,_(href,http://www.google.com/search?q=_searchStr($2,$3))$1,$2)}")

define("{_produce}","{errprint( $3 $1 $2)syscmd($3 _fipf($1 $2) )}")


divert(0)
